
namespace hms
{

#define CHEAD(RETURN_TYPE) \
template<typename CellsType> \
RETURN_TYPE CellsBase<CellsType>::

CHEAD()
CellsBase( const MeshType& meshArg ){
	mesh( meshArg );
}

CHEAD(auto) mesh() const -> const MeshType& {
	assert( m_mesh && "Dereferencing nullptr!" );
	return *m_mesh;
}
CHEAD(void) mesh( const MeshType& meshArg ){
	// assert( !m_mesh && "CellsBase already has a mesh assigned to it!" );
	m_mesh = std::experimental::make_observer( &meshArg );
}

#define FORWARD_FUNC_NOARG(NAME,RET) \
CHEAD(auto) NAME() const -> RET { \
	return this->derived().NAME##Imp(); \
}

FORWARD_FUNC_NOARG(areas,AreasReturnType)
FORWARD_FUNC_NOARG(circumfs,CircumfsReturnType)
FORWARD_FUNC_NOARG(centroids,CentroidsReturnType)

#undef FORWARD_FUNC_NOARG
#undef CHEAD

} // namespace hms
